import {Component} from "@angular/core";
import {UserService} from "../../service/user/user.service";
import {UrlData} from "../../common/urldata";
import {ToastController} from "ionic-angular";


@Component({
  selector: 'page-netsetting',
  templateUrl: 'netsetting.html',
  providers: [UserService]
})
export class NetSettingPage {
  private net: string;

  constructor(private urlData: UrlData, private toast: ToastController) {
    this.net = urlData.baseUrl;
  }

  netClick() {
    console.log(this.net);
    this.urlData.baseUrl = this.net;
    this.toast.create({
      message: "地址修改成功!",
      duration: 2000,
      position: 'top'
    }).present();
  }
}
